<?php
	namespace Admin\Model;
	class AdminUserModel extends \Think\Model{
		public function getAll(){
			//这里获取所有的数据
			$userlist=$this->select();
			foreach($userlist as  $key=>$val){
				$userlist[$key]['sex']=$val['sex']?'男':'女';
			}
			return $userlist;
		}
		public function getFind($data){
			$where='';
			foreach ($data as $key => $val) {
				$where.="`$key`='$val' AND ";
			}
			$where=trim($where,' AND ');
			$res=$this->where("$where")->find();
			if($res==null){
				return false;
			}else{
				return $res;
			}
		}
	} 